package com.example.forum.dao;

import com.example.forum.model.Board;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BoardMapper {
    int insert(Board row);

    int insertSelective(Board row);

    Board selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Board row);

    int updateByPrimaryKey(Board row);

    //查询首页的板块列表
    List<Board> selectByNum(@Param("num") Integer num);

    //更新版块帖子的数量（删除帖子）
    //int updateArticleCountById(@Param("id") Long id);
}